package com.zzcoder.mall.data.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;

@ApiModel(value = "订单")
@Data
@Table
@Entity
public class OmsOrder extends BaseEntity {
    @ApiModelProperty(value = "订单编号")
    @Column
    private String code;

    @ApiModelProperty(value = "订单状态")
    @Column
    @Enumerated(EnumType.STRING)
    private OmsOrderStatus orderStatus;

    @ApiModelProperty(value = "备注")
    @Column
    private String remark;

    @ApiModelProperty(value = "会员ID")
    @Column
    private Long memberId;

    @ApiModelProperty(value = "会员昵称")
    @Column
    private String memberNickname;

    @ApiModelProperty(value = "总金额")
    @Column
    private Double amount;

    @ApiModelProperty(value = "收件人")
    @Column
    private String receiverName;

    @ApiModelProperty(value = "收件人号码")
    @Column
    private String receiverPhone;

    @ApiModelProperty(value = "省代码")
    @Column
    private String receiverProvinceCode;

    @ApiModelProperty(value = "省")
    @Column
    private String receiverProvince;

    @ApiModelProperty(value = "市代码")
    @Column
    private String receiverCityCode;

    @ApiModelProperty(value = "市")
    @Column
    private String receiverCity;

    @ApiModelProperty(value = "区代码")
    @Column
    private String receiverDistrictCode;

    @ApiModelProperty(value = "区")
    @Column
    private String receiverDistrict;

    @ApiModelProperty(value = "详细地址")
    @Column
    private String receiverAddress;

    @ApiModelProperty(value = "下单时间")
    @Column
    private Date orderTime;

    @ApiModelProperty(value = "付款时间")
    @Column
    private Date paymentTime;

    @ApiModelProperty(value = "付款方式")
    @Column
    @Enumerated(EnumType.STRING)
    private OmsPaymentType paymentType;

    @ApiModelProperty(value = "付款账户")
    @Column
    private String paymentAccount;

    @ApiModelProperty(value = "发货时间")
    @Column
    private Date expressTime;

    @ApiModelProperty(value = "快递公司")
    @Column
    private String expressCompany;

    @ApiModelProperty(value = "快递编号")
    @Column
    private String expressNumber;

    @ApiModelProperty(value = "收货时间")
    @Column
    private Date receivedTime;

    @ApiModelProperty(value = "确认收货时间")
    @Column
    private Date confirmTime;

    @ApiModelProperty(value = "关闭时间")
    @Column
    private Date closedTime;
}
